import request from '@/utils/request'

/**
 * 登录接口函数
 * @param {object} data - {mobile: xxx, password: xxx}
 * @returns
 */
export const login = (data) => {
  return request({
    method: 'post',
    url: '/sys/login',
    data
  })
}

/**
 * 获取用户基本资料
 */
export const getUserInfo = () => {
  return request({
    url: '/sys/profile',
    method: 'post'
  })
}

/**
 * 根据用户id获取用户详细信息
 * @param {string} id
 * @returns
 */
export const getUserDetailById = (id) => {
  return request({
    url: `/sys/user/${id}`
  })
}

export function logout() {

}
